package com.dodalizer.parser.classes;

import org.apache.commons.lang.ArrayUtils;

import com.dodalizer.parser.method.JavaMethod;
import com.dodalizer.parser.modifierset.ModifierSet;

public class JavaClass extends Class {

    private JavaMethod[] methods;
    private String[] extendz;
    private String[] implementz;
    private boolean interfacz;
    private boolean enumm;

    private ModifierSet modifierSet;

    public JavaClass(String name) {
        super();
        setName(name);
        
        this.modifierSet = new ModifierSet();
    }

    public JavaMethod[] getMethods() {
        return methods;
    }

    public void setMethods(JavaMethod[] methods) {
        this.methods = methods;
    }
    
    public void addMethod(JavaMethod method) {
        this.methods = (JavaMethod[]) ArrayUtils.add(this.methods, method);
    }
    
    public void setModifierSet(ModifierSet modifierSet) {
        this.modifierSet = modifierSet;
    }
    
    public ModifierSet getModifierSet() {
        return this.modifierSet;
    }
    
    public void addModifier(int modifier) {
        this.modifierSet.addModifier(modifier);
    }

    public String[] getExtends() {
        return extendz;
    }

    public void setExtends(String[] extendz) {
        this.extendz = extendz;
    }

    public void addExtends(String extendz) {
        this.extendz = (String[]) ArrayUtils.add(this.extendz, extendz);
    }

    public String[] getImplements() {
        return implementz;
    }

    public void setImplements(String[] implementz) {
        this.implementz = implementz;
    }

    public void addImplements(String implementz) {
        this.implementz = (String[]) ArrayUtils.add(this.implementz, implementz);
    }
    
    public boolean isInterface() {
        return interfacz;
    }

    public void setInterface(boolean interfacz) {
        this.interfacz = interfacz;
    }

    public boolean isEnum() {
        return enumm;
    }

    public void setEnum(boolean enumm) {
        this.enumm = enumm;
    }
}
